/* 公共函数 */
function toggleMenu(){
  document.getElementById('navMenu').classList.toggle('active');
}
function createNav(active){
  return `
  <div class="container">
    <div class="header-content">
      <div class="logo"><h1>广州桦霖气体有限公司</h1></div>
      <button class="mobile-menu-toggle" onclick="toggleMenu()">☰</button>
      <nav>
        <ul id="navMenu">
          <li><a href="index.html" ${active==='index'?'class="active"':''}>首页</a></li>
          <li><a href="products.html" ${active==='products'?'class="active"':''}>产品列表</a></li>
          <li><a href="news.html" ${active==='news'?'class="active"':''}>新闻资讯</a></li>
          <li><a href="services.html" ${active==='services'?'class="active"':''}>服务内容</a></li>
          <li><a href="about.html" ${active==='about'?'class="active"':''}>关于我们</a></li>
          <li><a href="contact.html" ${active==='contact'?'class="active"':''}>联系我们</a></li>
        </ul>
      </nav>
    </div>
  </div>`;
}
function createFooter(){
  return `
  <div class="container">
    <div class="footer-content">
      <div>
        <h3>产品分类</h3>
        <ul>
          <li><a href="products.html?cate=food">食品级气体</a></li>
          <li><a href="products.html?cate=industrial">工业气体</a></li>
          <li><a href="products.html?cate=standard">标准气体</a></li>
        </ul>
      </div>
      <div>
        <h3>快速链接</h3>
        <ul>
          <li><a href="about.html">关于我们</a></li>
          <li><a href="services.html">服务内容</a></li>
          <li><a href="news.html">新闻资讯</a></li>
          <li><a href="contact.html">联系我们</a></li>
        </ul>
      </div>
      <div>
        <h3>联系方式</h3>
        <ul>
          <li>电话：136-2251-5296</li>
          <li>地址：广州市南沙开发区</li>
          <li>邮箱：info@hualingas.com</li>
        </ul>
      </div>
    </div>
    <div class="footer-copyright">
      © 2024 广州桦霖气体有限公司 All rights reserved.
    </div>
  </div>`;
}